// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   HistoryAction.java

package com.boci.clientapp.history.action;

import com.boci.clientapp.history.handler.TransactionHistoryHandler;
import com.boci.clientapp.main.ApplicationService;
import com.boci.clientapp.main.MainPanel;
import com.boci.common.action.AbstractAction;
import com.boci.common.constant.RequestTypeConst;
import com.boci.common.ui.AbstractPanel;
import com.boci.common.util.AppException;
import com.boci.common.util.StringUtil;
import java.util.HashMap;
import java.util.logging.Logger;

public class HistoryAction extends AbstractAction
{

    public HistoryAction()
    {
        strReqType = RequestTypeConst.BOCI_TRANS_HIST_URL;
        strModName = "HISTORY_MODULE";
        strScrName = "HISTORY_SCREEN";
    }

    private void addExtraValues(HashMap pInpMap)
    {
        pInpMap.put("selectAcct", appServ.getAccountNo());
        pInpMap.put("testValue", "Go");
    }

    public void doProcess(HashMap pInpMap, String pActionType)
    {
    	try{
	        appServ.setBusy(true);
	        addExtraValues(pInpMap);
	        TransactionHistoryHandler historyHandler = new TransactionHistoryHandler(strReqType);
	        com.boci.common.vo.ResponseVO historyVO = historyHandler.getTransactionHistory(pInpMap);
	        AbstractPanel historyPanel = appServ.getMainPanel().getPanel(strModName, strScrName);
	        historyPanel.refresh(historyVO);
    	}
    	catch(AppException appEx)
        {
            logger.info(StringUtil.formatException(appEx));
            AbstractPanel historyPanel = appServ.getMainPanel().getPanel(strModName, strScrName);
            historyPanel.refresh(null);
            appServ.showErrorDialog(null, appEx.getMessage());
        }
        catch(Exception sysEx)
        {
            logger.severe(StringUtil.formatException(sysEx));
            AbstractPanel historyPanel = appServ.getMainPanel().getPanel(strModName, strScrName);
            historyPanel.refresh(null);
            appServ.showSysErrDialog();
        }
        finally
        {
            appServ.setBusy(false);
        }
        return;
    }

    String strReqType;
    String strModName;
    String strScrName;
}
